import datetime

if __name__ == '__main__':
    print(datetime.datetime.now())
    a = lambda x, y: x * y

    print(a(1, 3))

    b = "123" + "456" if None else ""

    print(b)

    li = [1, 2, 3, 4]
    li1 = [2, 3, 4, 5]


    def add(num1, num2):
        return num1 + num2


    ret = map(add, li, li1)

    # print(ret)    # python2中直接返回列表
    print(list(ret))  # python3中返回对象，需要通过list拿到具体的数据值

    import os

    import sys
    BASE_DIR = os.path.dirname(os.path.abspath(__file__))
    # print(os.path.abspath(__file__))
    # print(os.path.dirname(os.path.abspath(__file__)))
    # sys.path.insert(0, os.path.join(BASE_DIR, 'apps'))

    public_path = os.path.join("/", 'launch/keys/alipay_public_key.pem')
    # path  = open(public_path).read()
    print(BASE_DIR)
    print(public_path)
    # print(path)
